package cn.getech.data.development.service;

import cn.getech.data.development.model.dto.RealtimeResourceDto;
import cn.getech.data.development.model.qo.RealtimeResourceSearchQO;
import cn.getech.data.development.model.req.realtimeresource.RealtimeResourceListReq;
import cn.getech.data.development.model.res.realtimeresource.RealtimeResourceListRes;
import cn.getech.data.intelligence.common.utils.PageUtils2;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.getech.data.development.entity.RealtimeResourceEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 实时资源管理
 *
 * @author qiuxinglei
 * @email qiuxinglei@gmail.com
 * @date 2020-09-02 11:14:22
 */
public interface RealtimeResourceService extends IService<RealtimeResourceEntity> {

    PageUtils2<RealtimeResourceEntity> queryPage(Map<String, Object> params);

    PageUtils2<RealtimeResourceListRes> queryPage(RealtimeResourceListReq req, Long userId);

    PageUtils2<RealtimeResourceListRes> queryPageByProc(RealtimeResourceListReq req, Long userId);

    Long save(Long procId, String resourceName, String fileExtension, String desc, Integer typeResource, MultipartFile multipartFile, Long userId);

    boolean deleteResource(Long procId, Long userId);

    List<RealtimeResourceDto> listAll(RealtimeResourceSearchQO realtimeResourceSearchQO);

    void download(Long resourceId, HttpServletResponse response);
}

